home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 248 / 248.d81 / t.db+ doc 2 < prev    next >
Text File  |  2022-08-26  |  17KB  |  665 lines

  1. u
  2.             DOTBASIC PLUS
  3.                Part II
  4.      by Dave Moorman & Lee Novak
  5.  
  6.  
  7.   POSITION MOUSE
  8.   --------------
  9.     Include .PUTM
  10.   .PUTM,X,Y
  11.  
  12.     Use this command to place the
  13. mouse at any cellular X,Y location. If
  14. you attempt to place the mouse outside
  15. of its "cage", it will be snapped back
  16. inside instantly.
  17.  
  18.  
  19.   PAUSE
  20.   -----
  21.     Include: .PAUSE
  22.   .PAUSE,jiffies
  23.  
  24.     This routine waits for the
  25. specified number of jiffy interrupts
  26. to pass before returning control to
  27. you. The wait is (usually) measured in
  28. sixtieths of a second, and the value
  29. cannot exceed 255.
  30.  
  31.  
  32.   PRINT CENTER
  33.   ------------
  34.     Include .PC
  35.   .PC,Y,STRING
  36.  
  37.     This routine prints your string
  38. (up to 40 characters) centered on any
  39. line Y (0-24). Don't use F7's in these
  40. strings as you probably won't get the
  41. effect you were looking for.
  42.  
  43.  
  44.   BOX
  45.   ---
  46.     Include: .BOX
  47.   .BOX,X,Y,W,H,SC,CO
  48.  
  49.     The BOX command is able to perform
  50. a variety of tasks, based on the
  51. parameters you feed it. The last two
  52. parameters specify what to do within
  53. the boundaries:
  54.  
  55.      FULL: To fill an area with a
  56. character, just specify its SCreen
  57. code (0-254) and the COlor you want it
  58. to be (0-15).
  59.  
  60.      PAINT: Using 255 for a screen
  61. code causes the routine to only color
  62. the area, leaving screen RAM intact.
  63.  
  64.      SHADE: Using 255 for a color code
  65. causes all of the colors in the area
  66. to be assigned a darker shade than
  67. each currently has. Screen RAM is not
  68. affected.
  69.  
  70.      REVERSE, UN-REVERSE, and FLIP:
  71. Add 128 to the color code to invoke
  72. reverse, 64 for un-reverse, and 192
  73. for flip. Color RAM will not be
  74. affected unless you add an additional
  75. 16 to the values above.
  76.  
  77.      FRAME: Adding 32 to the color
  78. code will draw a frame (like BLOCK
  79. below) that ignores the center area
  80. automatically.
  81.  
  82.      BLOCK: Adding 16 to the color
  83. code results in a box made up of nine
  84. specific characters. The defaults work
  85. well with either case font. They can
  86. be changed for use with custom fonts
  87. that have their box-making characters
  88. elsewhere.
  89.  
  90.      BLOCK refuses to use screen code
  91. 0 in what it draws. This is so you can
  92. set MV+41 (the screen code used to
  93. draw the interior of boxes) to zero.
  94. The effect is that BLOCK now behaves
  95. like FRAME, leaving the center alone.
  96.  
  97.  
  98.   AFFECT REGION
  99.   -------------
  100.     Include: .AREG
  101.   .AREG,Region#,SC,CO
  102.  
  103.     This command is just like BOX, but
  104. instead of specifying the X,Y,W,H
  105. parameters, you indicate which defined
  106. region (using .DREG) you want to
  107. affect.
  108.  
  109.     AFFECT is most often used in
  110. causing visible changes to a region
  111. when it is clicked on. It can also
  112. help in setting up screens.
  113.  
  114.  
  115.   SCREEN STASH
  116.   SCREEN RESTORE
  117.   --------------
  118.     Include: .STASH,.RESTR
  119.   .STASH,PAGE
  120.   .RESTR,PAGE
  121.  
  122.     SCREEN STASH will store the text
  123. screen and color map anywhere in
  124. memory, even under I/O. 8 consecutive
  125. pages (2048 bytes or 2K) are needed to
  126. save screen and color. The border and
  127. background colors are also saved. We
  128. use page 208 and page 216 extensively.
  129.  
  130.     SCREEN RESTORE displays a stashed
  131. screen from anywhere in memory. The
  132. border and background colors are also
  133. restored.
  134.  
  135.   Technical note: The stash/restore
  136. routines copy 1002 bytes each of the
  137. screen and color map. STASH will put
  138. the border and background colors into
  139. locations $d800+1000 and $d800+1001
  140. before doing the memory transfer.
  141. After RESTOREing, the colors are
  142. brought back from those locations.
  143. The two bytes after the end of the
  144. screen are stashed and restored also,
  145. but they have no significance.
  146.  
  147.  
  148.   CUT
  149.   PASTE
  150.   -----
  151.     Include: .CUT,.PASTE
  152.   .CUT,X,Y,W,H,LOC
  153.   .PASTE,X,Y,W,H,LOC
  154.  
  155.     CUT and PASTE are able to stash
  156. and restore any size portion of the
  157. screen to or from any location, even
  158. under I/O.
  159.  
  160.     The data is stored sequentially in
  161. memory with each cell's screen code
  162. and color code stored one after
  163. another. This formula reveals how much
  164. memory is consumed by CUT:
  165.  
  166.    bytes = W * H * 2
  167.  
  168.     PASTE requires that you specify
  169. the area to be filled. As long as you
  170. use the same Width and Height as the
  171. cut data, you can PASTE it wherever
  172. you want, oodles of times. However, no
  173. part of the area can be off-screen.
  174.  
  175.  
  176.   LET GO
  177.   ------
  178.     Include: .LG
  179.   .LG
  180.  
  181.      This command will wait until the
  182. user is not holding either of the
  183. mouse buttons (or their equivalents)
  184. down, even if it takes all day.
  185.  
  186.   100 .DO:.MA:.BG,X
  187.   110 X=(X+1)AND15:.LG
  188.   120 .UN L2%
  189.  
  190.  
  191.   COPYMEM
  192.   -------
  193.     Include: .CPYMEM
  194.   .CPYMEM,START,END+1,DESTINATION
  195.  
  196.    SWAP MEM
  197.     Include: .SWPMEM
  198.   .SWPMEM,START,END+1,DESTINATION
  199.  
  200.    COPY I/O INTACT
  201.     Include: .CPYIO
  202.   .CPYIO,START,END+1,DESTINATION
  203.  
  204.    COPY CHR EXPOSED
  205.     Include: .CPYCHR
  206.   .CPYCHR,START,END+1,DESTINATION
  207.  
  208.     COPY MEM is the classic command.
  209. All ROMS are lifted and a raw memory
  210. transfer is performed. The speed:
  211. approximately 28 cycles per byte. If
  212. the DESTinaton lies somewhere between
  213. the START and END, a backwards copy is
  214. performed to prevent corruption.
  215.  
  216.     SWAP MEM will swap the area of
  217. memory with that at the destination,
  218. at a rate of 41 cycles per byte.
  219. (Having the destination between the
  220. start and end is NOT a good idea with
  221. .SWPMEM!)
  222.  
  223.     COPY I/O INTACT will lift the
  224. ROMS, but leave the $d000 area alone.
  225. This would be useful in copying the
  226. color RAM or the VIC-chip's settings.
  227.  
  228.     COPY CHAR EXPOSED will lift the
  229. ROMS, but expose the Character-ROM in
  230. the $d000 area so you can copy it.
  231.  
  232.  
  233.   REGULAR MENU
  234.   ------------
  235.     Include: .MENU
  236.   .MENU,X,Y,W,I,U,Hi,HOT$
  237.  
  238.     This command creates a highlight
  239. bar that moves in sync with the mouse
  240. pointer, until a selection is made.
  241. When an item is clicked on, SL% will
  242. return that "selection" number, which
  243. will be anywhere from 1 to 25.
  244.  
  245.     I is the number of items in the
  246. menu (same as Height on other area-
  247. covering commands).
  248.  
  249.     U is the color of unhighlighted
  250. items in the menu. The highlight bar
  251. is colored H. If you do not want the
  252. text to reverse or un-reverse as the
  253. bar moves, add 128 to H.
  254.  
  255.     You can use the CRSR/RETURN keys
  256. instead of a mouse or joystick. In
  257. order to provide a more natural menu
  258. interface, the "Keyboard Enable"
  259. variable at MV+20 is temporarily
  260. zeroed during menus. The CRSR keys are
  261. then read manually to move the
  262. highlight bar, one move per press,
  263. like we're all used to.
  264.  
  265.     The HOTKEY string allows direct
  266. selection of menu items. For example,
  267. if you have hotkeys of "loadst*r", and
  268. the user presses "d", the fourth item
  269. is selected and the highlight bar is
  270. moved there. If there was no such
  271. item, SL% still returns a 4 but the
  272. highlight bar would not change.
  273.  
  274.     MENUS can have "regions active"
  275. without the need to POKE to MV+10 or
  276. MV+11. Clicking on an active region
  277. from a menu will return the region
  278. number (plus 128) in SL%. The HOTKEYS
  279. would return "region-like" values.
  280.  
  281.     The H+64 feature of menus will
  282. only work if "honor hotkey colors" is
  283. enabled. A HOTKEY COLOR is just ANY
  284. color within the text of a menu which
  285. is neither the highlight nor
  286. un-highlight color. That leaves you
  287. with 14 colors to make your menu's
  288. hotkeys stand out, and stay that way.
  289.  
  290.    Related Variables:     (& defaults)
  291.  
  292.   MV+10  Menu Type           (192)
  293.   MV+12  Global Escape        (0)
  294.  
  295.     MV+12 holds the ASCII code for
  296. what you'd like to designate as the
  297. escape key for ALL your menus. SL%
  298. returns a zero when the escape key is
  299. pressed, except in one instance...
  300.  
  301.     MV+10 dictates how your regular
  302. menus will behave. Each bit stands for
  303. a specific menu feature. Just add up
  304. the values for the features you want
  305. and POKE that number to MV+10.
  306.  
  307.    +128  Automatic Caging of Mouse
  308.    + 64  Automatic Point-to-First
  309.    + 32  Must Select
  310.    + 16  Escape Equal-to-Last
  311.    +  8  Honor Hotkey Colors
  312.    +  4  Dual Response
  313.    +  2  Un-highlight after Select
  314.    +  1  Stray-to-Exit
  315.  
  316.     +128 causes the mouse to be
  317. confined within the menu's borders.
  318. After a selection is made, the
  319. previous cage is restored. If
  320. auto-caging is not enabled, the user
  321. may be able to click on the area
  322. outside of the menu, which would
  323. return zero in SL% (unless it is an
  324. active region).
  325.  
  326.     +64 causes the mouse to be put at
  327. the rightmost cell of the first item
  328. the instant a regular menu is called.
  329.  
  330.     +32 causes nothing to happen if
  331. the user clicks on the area outside of
  332. the menu. The menu remain